using System.ComponentModel.Composition;
using SimpleSpreadsheet.Framework;

namespace SimpleSpreadsheet.ViewModels
{
    /// <summary>
    /// Shell ViewModel capable of activating and displaying one view (Screen)
    /// </summary>
    [Export(typeof(IShell))]
    public class ShellViewModel : Conductor<object>, IShell
    {
        public WorkbookViewModel CurrentWorkbookViewModel { get; private set; }
        
        public ShellViewModel()
        {
            DisplayName = "Simple Spreadsheet";
            //ShowWorkbook();
        }

        /// <summary>
        /// Shows a workbookview passing worksheet size to it
        /// </summary>
        /// <param name="rows"></param>
        /// <param name="columns"></param>
        public void ShowWorkbook(int rows, int columns)
        {
            CurrentWorkbookViewModel = new WorkbookViewModel(this, rows, columns);
            ActivateItem(CurrentWorkbookViewModel);
        }
    }
}
